#pragma once
#include <Rz/Object.h>
#include <Rz/Graphics/Render/IDepthStencilState.h>

RZ_CLASS_FWD_DECL3(Rz, Graphics, Render, IRenderDevice);

namespace Rz { namespace Graphics { namespace Render { namespace Libraries { namespace OpenGL {

class GLDepthStencilState :
	public Object,
	public IDepthStencilState
{
	public:
		RZ_RTTI(Rz::Graphics::Render::Libraries::OpenGL, GLDepthStencilState);
		RZ_RTTI_IMPLEMENTS(Object, IDepthStencilState);
		RZ_RTTI_END;

		GLDepthStencilState(IRenderDevice* renderDevice);

		virtual void Bind() override;
		virtual void Unbind() override;
		
	protected:
		static GLenum TranslateCompareFunction(CompareFunction cmpFn);
		static GLenum TranslateStencilOp(StencilOperation operation);
};

} } } } }
